import dayjs from 'dayjs'
import Vue from 'vue'
//引入中文
import 'dayjs/locale/zh-cn'
dayjs.locale('zh-cn')
import relativeTime from 'dayjs/plugin/relativeTime'
dayjs.extend(relativeTime)
/* console.log(dayjs().format('YYYY-MM-DD'));
console.log(dayjs().to(dayjs('1998-04-12'))); */
//添加过滤器
Vue.filter("dateFormat", value => {
  return dayjs().to(dayjs(value))
})